StupidBeauty
Read times:513Posted at:Tue Jan 31 00:49:01 2012
- no title specified

转载:XML and JSON Response

在Wt中要写Web Service,并且返回XML的话,可继承WResource,重载其handleRequest方法,并且使用WServer::addResource将这個WResource子类绑定到一個固定的URL上。

http://redmine.webtoolkit.eu/boards/2/topics/2438

亮点:

Actually, for the non-HTML output, you need to implement resources. If you want these resources to map to 'global' URLs (which I guess is the case for web services), you should deploy them as static resources (WServer::addResource()); if you want to tie them to a session (protected by the session ID), you should add them directly to a WAnchor.

A WApplication only serves a purpose for a normal (HTML/JavaScript/CSS) interactive session.

As an example of an RSS feed which is global, consider the blog example / homepage example, where the RSS feed for the blog is a static resource.

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands